Skip to content

[CI] Add draft release step to GitHub Actions workflow#644

Merged
YooSunYoung merged 10 commits into
mainfrom
fix-ci-release
Jun 30, 2026
Merged

[CI] Add draft release step to GitHub Actions workflow#644
YooSunYoung merged 10 commits into
mainfrom
fix-ci-release

Conversation

@YooSunYoung

@YooSunYoung YooSunYoung commented Jun 18, 2026

Copy link
Copy Markdown
Member

The release note upload job failed because the release was not drafted/published yet.
It was depending on the assets uploading job to create the release if not present.

It used default values for creating the release if there is None for the given tag.
Then the title was set to a weird commit message instead of the tag name (it depends on how many commits belong to the PR apparently?).

So I added an explicit release draft step with the specific title(tag name).
In this way we can use the runners a bit more efficiently... (release note generating and docs build can take a while.)

Also I removed the upload file action and used gh cli directly instead.

The release note uploading job is responsible for publishing the release,
i.e. the release is set to latest/published from draft when there is a release note.

Assets uploading (built docs) won't be necessarily done by the time the release is published.

@github-actions github-actions Bot added the CI label Jun 18, 2026
@github-actions github-actions Bot changed the title Add draft release step to GitHub Actions workflow [CI] Add draft release step to GitHub Actions workflow Jun 18, 2026
@YooSunYoung YooSunYoung marked this pull request as ready for review June 18, 2026 09:42
@github-project-automation github-project-automation Bot moved this to In progress in Development Board Jun 18, 2026
@YooSunYoung YooSunYoung moved this from In progress to Selected in Development Board Jun 18, 2026
@YooSunYoung

Copy link
Copy Markdown
Member Author

Sorry for pushing things continuously... it's now really ready...!

with:
packages-dir: dist/

draft-release:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step should be green even if creating the release fails.
For example, if release was created via the web interface.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the step success optional and then added a checking step

GH_TOKEN: ${{ github.token }}
ASSET-FILE-PATH: ./documentation-${{ needs.determine-package.outputs.package }}-${{ needs.determine-package.outputs.version }}.zip
TAG: ${{ needs.determine-package.outputs.package }}/${{ needs.determine-package.outputs.version }}
run: gh release upload ${TAG} ${ASSET-FILE-PATH} --clobber # Overwrite existing assets of the same name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to these changes: can we use the same (get rid of the svenstaro/upload-release-action) for uploading nightly reduced files here: https://github.com/scipp/ess/blob/main/.github/workflows/nightly.yml#L90

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so ...?

Developers should be able to create a release using github release UI.
In that case, the gh release create command will fail.
Clarify comment for release check command.
@YooSunYoung

Copy link
Copy Markdown
Member Author

I manually updated the release note btw: https://github.com/scipp/ess/releases/tag/essreduce%2F26.6.2

Comment thread .github/workflows/release.yml Outdated
release_note = [
"## What's Changed",
'',
f"### {package_name.replace('ess', 'ESS')}",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why this is now gone?

@YooSunYoung YooSunYoung Jun 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already included in the release title so it was unnecessarily verbose.

Or we can integrate that into the other section title..? Like:

What's Changed in ESSreduce/26.6.2

Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
@YooSunYoung YooSunYoung enabled auto-merge June 30, 2026 13:56
@YooSunYoung YooSunYoung added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit 76b10e7 Jun 30, 2026
5 checks passed
@YooSunYoung YooSunYoung deleted the fix-ci-release branch June 30, 2026 14:10
@github-project-automation github-project-automation Bot moved this from Selected to Done in Development Board Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants